<!DOCTYPE html>
<html>
<head>
    <include file="./public/sty.html"/>
</head>
<body>
<script src="/style/js/qrcode.min.js"></script>
<div id="app" class="ebankPay">
    <include file="./public/header.html"/>
    <div class="container containerUser fix pt15" s="[object Object]">
        <div class="slideUser">
            <ul class="sildeSession"><h3><span></span>账号管理</h3>
                <li class=""><a href="{:U('Users/personalInfo')}">个人信息</a></li>
                <li class="curr"><a href="{:U('Users/securityCenter')}">安全中心</a></li>
                <li class=""><a href="{:U('Users/manageBankcard2')}">银行卡管理</a></li>
            </ul>
            <ul class="sildeSession"><h3><span></span>投注管理</h3>
                <li><a href="{:U('Users/BetRecord')}" class="">投注记录</a></li>
                <li><a href="{:U('Users/seekOrder')}" class="">追号记录</a></li>
            </ul>
            <ul class="sildeSession"><h3><span></span>资金管理</h3>
                <li><a href="{:U('Users/BillRecord')}" class="">交易记录</a></li>
                <li class=""><a href="{:U('Users/PLstatement')}">今日盈亏</a></li>
            </ul>
            <?php if($wanjia['utype'] == '1'){ ?>
                <ul class="sildeSession">
                    <h3><span></span>代理中心</h3>
                    <li><a href="{:U('Users/agentIntro')}" class="">代理说明</a></li>
                    <li class=""><a href="{:U('Users/agentReport')}">代理报表</a></li>
                    <li><a href="{:U('Users/lowerReport')}" class="">下级报表</a></li>
                    <li class=""><a href="{:U('Users/manageInvite')}">下级开户</a></li>
                    <li><a href="{:U('Users/agentMember')}" class="">会员管理</a></li>
                    <li><a href="{:U('Users/agentBetRecord')}" class="">投注明细</a></li>
                    <li><a href="{:U('Users/agentBillRecord')}" class="">交易明细</a></li>
                </ul>
            <?php }?>
            <ul class="sildeSession"><h3><span></span>消息管理</h3>
                <li><a href="{:U('Users/letter')}" class="">站内信</a></li>
                <li><a href="{:U('Users/Notice')}" class="">网站公告</a></li>
            </ul>
        </div>
        <div data-v-6bb4bdc2="" class="userRight">
            <div data-v-6bb4bdc2="" class="userTitle mgb10">我要充值</div>
            <div data-v-6bb4bdc2="" class="userMain mgb10">
                <div data-v-6bb4bdc2="" class="newTab pt15 fix">
					<a href="{:U('Index/ebankPay')}" class="curr curr" data-v-6bb4bdc2="">银行转账</a>
					<a href="{:U('Index/alipay')}" class="" data-v-6bb4bdc2="">支付宝充值</a> 
					<a href="{:U('Index/wechatPay')}" class="" data-v-6bb4bdc2="">微信支付</a>
                    <a href="{:U('Index/scanPay')}" class="" data-v-6bb4bdc2="">扫码支付</a>
				</div>
            <form action="{:U('Index/ebankPay')}" enctype="multipart/form-data" method="post" id="form">
                <div data-v-6bb4bdc2="" id="isShow">
                    <div data-v-6bb4bdc2="" class="stepBox">
					<em data-v-6bb4bdc2=""></em>
					<span data-v-6bb4bdc2="">
						<b data-v-6bb4bdc2="">请转账到以下银行账户：</b>
						单笔最低<ins data-v-6bb4bdc2="">10</ins>元，最高<ins data-v-6bb4bdc2="">500000 </ins>
					</span>
                        <ul data-v-6bb4bdc2="" class="bankStyle">
                            <li data-v-6bb4bdc2="" class="bankTable">
                                <ins data-v-6bb4bdc2="">收款银行：</ins>
                                <ins data-v-6bb4bdc2="">
                                    <div data-v-6bb4bdc2="" class="bankblockList fix">
                                        <div data-v-6bb4bdc2="">
                                            {$arr["yinhang"]}
                                        </div>
                                    </div>
                                </ins>
                            </li>
                            <li data-v-6bb4bdc2="">
                                <ins data-v-6bb4bdc2="" style="width: 30px;">银行账户名：</ins>
                                <ins data-v-6bb4bdc2="">
                                    <input data-v-6bb4bdc2="" name="name" type="text" class="code" id="acco" value="{$arr.name}">
									<!--<a data-v-6bb4bdc2="" class="copy_btn">复制</a>-->
								</ins>
                            </li>
                            <li data-v-6bb4bdc2="">
                                <ins data-v-6bb4bdc2="" class="leftIn">银行账号：</ins>
                                <ins data-v-6bb4bdc2="">
                                    <input data-v-6bb4bdc2=""  name="card" type="text" class="code" id="card" value="{$arr.number}" style="width: 160px">
									<!--<a data-v-6bb4bdc2="" class="copy_btn">复制</a>-->
								</ins>
                            </li>
                            <li data-v-6bb4bdc2="">
                                <ins data-v-6bb4bdc2="" class="leftIn">开户支行：</ins>
                                <ins data-v-6bb4bdc2="">
                                    <input data-v-6bb4bdc2=""  name="zhihang" type="text" class="code" id="kh" value="{$arr.zhihang}">
									<!--<a data-v-6bb4bdc2="" class="copy_btn">复制</a>-->
								</ins>
                            </li>
                        </ul>
                    </div>
                    <div data-v-6bb4bdc2="" class="stepBox">
						<em data-v-6bb4bdc2=""></em>
						<span data-v-6bb4bdc2="">
							<b data-v-6bb4bdc2="">请认真填写您的转账信息：</b>请务必转账后再提交订单,否则无法及时查到您的款项！</span>
                        <ul data-v-6bb4bdc2="">
                            <li data-v-6bb4bdc2="">
                                <ins data-v-6bb4bdc2="">
									<span data-v-6bb4bdc2="">充值金额：</span> 
									<input data-v-6bb4bdc2="" name="money" type="text" tag="充值金额" class="userInput" id="c_money" onkeyup="value=value.replace(/[^\d.]/g,'')">
                                </ins>
                                <ins data-v-6bb4bdc2="">
									<span data-v-6bb4bdc2="">您的银行账户：</span>
									<input data-v-6bb4bdc2="" name="my_name" type="text" tag="银行账户" class="userInput" id="my_name">
								</ins>
                            </li>
                        </ul>
                        <ul data-v-6bb4bdc2="">
							<h6 data-v-6bb4bdc2="">
                                <input class="submitBtn" type="button" value="提交充值订单" onclick="tij()" style="border: none">
							</h6>
						</ul>
                        <div data-v-6bb4bdc2="" class="userTip">
							<p data-v-6bb4bdc2="">※ 温馨提示：<br data-v-6bb4bdc2="">
                            1、请转账完成后再提交充值订单。<br data-v-6bb4bdc2="">
                            2、请正确填写您的户名和充值金额。<br data-v-6bb4bdc2="">
                            3、转账1笔提交1次，请勿重复提交订单。<br data-v-6bb4bdc2="">
                            4、转帐完成后请保留单据作为核对证明。
							</p>
						</div>
                    </div>
                </div>
            </form>
            </div>
        </div>
        <!--弹框 begian-->
        <div id="chongzhi" class="layermbox layermbox0 layermshow" index="10">
            <div class="laymshade"></div>
            <div class="layermmain">
                <div class="section">
                    <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                        <button class="layermend"></button>
                        <div class="layermcont">
                            <p>汇款成功后，会在一分钟内为您添加额度，请刷新您的账户余额!</p>
                        </div>
                        <div class="layermbtn"><span type="1">确定</span></div>
                    </div>
                </div>
            </div>
        </div>
        <!--弹框 end-->

        <div id="tishi1" class="layermbox layermbox0 layermshow" index="11">
            <div class="laymshade"></div>
            <div class="layermmain">
                <div class="section">
                    <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                        <button class="layermend"></button>
                        <div class="layermcont">·充值金额或者账户名不能为空·</div>
                        <div class="layermbtn"><span type="1">确定</span></div>
                    </div>
                </div>
            </div>
        </div>

        <div id="tishi2" class="layermbox layermbox0 layermshow" index="11">
            <div class="laymshade"></div>
            <div class="layermmain">
                <div class="section">
                    <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                        <button class="layermend"></button>
                        <div class="layermcont">·金额格式不正确·</div>
                        <div class="layermbtn"><span type="1">确定</span></div>
                    </div>
                </div>
            </div>
        </div>

        <div id="tishi3" class="layermbox layermbox0 layermshow" index="11">
            <div class="laymshade"></div>
            <div class="layermmain">
                <div class="section">
                    <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                        <button class="layermend"></button>
                        <div class="layermcont">·最低10最高500000·</div>
                        <div class="layermbtn"><span type="1">确定</span></div>
                    </div>
                </div>
            </div>
        </div>
        <div id="tishi4" class="layermbox layermbox0 layermshow" index="11">
            <div class="laymshade"></div>
            <div class="layermmain">
                <div class="section">
                    <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                        <button class="layermend"></button>
                        <div class="layermcont">·银行卡号长度必须在16到19之间·</div>
                        <div class="layermbtn"><span type="1">确定</span></div>
                    </div>
                </div>
            </div>
        </div>

        <div id="tishi5" class="layermbox layermbox0 layermshow" index="11">
            <div class="laymshade"></div>
            <div class="layermmain">
                <div class="section">
                    <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                        <button class="layermend"></button>
                        <div class="layermcont">·银行卡号必须全为数字·</div>
                        <div class="layermbtn"><span type="1">确定</span></div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div id="tishi6" class="layermbox layermbox0 layermshow" index="11">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">·银行卡号开头6位不符合规范·</div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
</div>
    <include file="./public/footer.html"/>
</div>


<script src="/style/js/jquery.min.js"></script>
<script src="/style/js/fx.js"></script>
<script>
    $(function(){
        personalInfo();
    })
    $(".layermbtn").click(function(){
        $(".layermbox").hide();
        location.href=location.href;
    });

    function tij(){
        var bank = $("#bank").html();//那个银行
        var acco = $("#acco").val();//银行户主
        var card = $("#card").val();//银行账号
        var kh = $("#kh").val();//银行支行

        var money = $("#c_money").val().replace(/\s/g,"");
        var my_name = $("#my_name").val();

        if(money=="" || my_name==""){
//            alert("充值金额或者账户名不能为空");
            $("#tishi1").show();
            return false;
        }
        var reg = /^[0-9]+(.[0-9]+)?$/; //   ^[0-9]+(.[0-9]{2})?$  限制小数点
        if(!reg.test(money)){
            $("#tishi2").show();
//            alert("金额格式不正确");
            return false;
        } 
        if(parseInt(money) < 10 || parseInt(money) >500000){
//            alert("最低10最高500000");
            $("#tishi3").show();
            return false;
        }
        if(my_name.length < 16 || my_name.length > 19) {
            $("#tishi4").show();
//            alert("银行卡号长度必须在16到19之间");
            return false;
        }
        var num = /^\d*$/; //全数字
        if(!num.exec(my_name)) {
//            alert("银行卡号必须全为数字");
            $("#tishi5").show();
            return false;
        }
        //开头6位
        var strBin = "10,18,30,35,37,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,58,60,62,65,68,69,84,87,88,94,95,98,99";
        if(strBin.indexOf(my_name.substring(0, 2)) == -1) {
//            alert("银行卡号开头6位不符合规范");
            $("#tishi6").show();
            return false;
        }
        $.ajax({
            type: "POST",
            url: "{:U('Index/ebankPay')}",
            data: {'bank': bank,'acco': acco,'card': card,'kh': kh,'money': money,'my_name': my_name},
            success: function (dat) {
               $("#chongzhi").show();
            }
        });
    }

</script>
</body>
</html>